<%@ page import="cn.gudian.cms.System.Page" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main"/>
  <title><g:message code="page.edit" default="Edit Page"/></title>

    <ckeditor:resources/>
</head>
<body>

<div class="body">
  <h1><g:message code="page.edit" default="Edit Page"/></h1>
  <g:if test="${flash.message}">
    <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}"/></div>
  </g:if>
  <g:hasErrors bean="${pageInstance}">
    <div class="errors">
      <g:renderErrors bean="${pageInstance}" as="list"/>
    </div>
  </g:hasErrors>
  <g:form method="post">
    <g:hiddenField name="id" value="${pageInstance?.id}"/>
    <g:hiddenField name="version" value="${pageInstance?.version}"/>
    <div class="dialog">
      <table>
        <tbody>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="title"><g:message code="page.title" default="Title"/>:</label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: pageInstance, field: 'title', 'errors')}">
            <g:textField name="title" value="${fieldValue(bean: pageInstance, field: 'title')}"/>
            <g:hiddenField name="path" value="${fieldValue(bean: pageInstance, field: 'path')}"/>

          </td>
        </tr>

      
        <tr class="prop">
          <td valign="top" class="name">
            <label for="keywords"><g:message code="page.keywords" default="Keywords"/>:</label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: pageInstance, field: 'keywords', 'errors')}">
  
            <g:textArea name="keywords" value="${fieldValue(bean: pageInstance, field: 'keywords')}" style="width:100%;height:40px;"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="body"><g:message code="page.body" default="Body"/>:</label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: pageInstance, field: 'body', 'errors')}">
              <ckeditor:editor name="body">
              ${pageInstance.body}
            </ckeditor:editor>
            <g:hiddenField name="temparticle" value="${fieldValue(bean: pageInstance, field: 'temparticle')}"/>
            <g:hiddenField name="senddate" value="${fieldValue(bean: pageInstance, field: 'senddate')}"/>
          </td>
        </tr>

        </tbody>
      </table>
    </div>
    <div class="buttons">
      <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'update', 'default': 'Update')}"/></span>
      </div>
  </g:form>
</div>
</body>
</html>
